<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.util.collection.impl.MapCollection</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.util.collection.impl.MapCollection");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461">tango.util.collection.impl.MapCollection</a></h1>
                
<b>File:</b><br>MapCollection.d<br><br>        Originally written by Doug Lea and released into the public domain. 
        Thanks for the assistance and support of Sun Microsystems Labs, Agorics 
        Inc, Loral, and everyone contributing, testing, and using this code.<br><br>
<b>History:</b><br>
Date     Who                What
        13Oct95  dl                 Create
        28jan97  dl                 make class public
        14Dec06  kb                 adapted for Tango usage<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L43">MapCollection</a></span>
<script>explorer.outline.addDecl('MapCollection');</script>(K, T) : Collection!(T), Map!(K, T);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">MapCollection extends Collection to provide default implementations of
        some Map operations. 
                
        </font><br><br>
<b>author:</b><br>Doug Lea
                @version 0.93<br><br>        <P> For an introduction to this package see <A HREF="index.html"
        > Overview </A>.<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L56">this</a></span>
<script>explorer.outline.addDecl('this');</script>(); [protected]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Initialize at version 0, an empty count, and null screener</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L67">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Predicate <span class="funcparam">screener</span>); [protected]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Initialize at version 0, an empty count, and supplied screener</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L81">allowsKey</a></span>
<script>explorer.outline.addDecl('allowsKey');</script>(K <span class="funcparam">key</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.Map.allowsKey.
                Default key-screen. Just checks for null.
                
                </font><br><br>
<b>See Also:</b><br>
tango.util.collection.Map.allowsKey<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L102">checkKey</a></span>
<script>explorer.outline.addDecl('checkKey');</script>(K <span class="funcparam">key</span>); [protected, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Principal method to throw a IllegalElementException for keys</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L119">opIndexAssign</a></span>
<script>explorer.outline.addDecl('opIndexAssign');</script>(T <span class="funcparam">element</span>, K <span class="funcparam">key</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.MapCollection.MapCollection.opIndexAssign
                Just calls add&#40;key, element&#41;.</font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.MapCollection.MapCollection.add<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L140">matches</a></span>
<script>explorer.outline.addDecl('matches');</script>(View!(T) <span class="funcparam">other</span>); [public, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.matches
                Time complexity: O&#40;n&#41;.
                Default implementation. Fairly sleazy approach.
                &#40;Defensible only when you remember that it is just a default impl.&#41;
                It tries to cast to one of the known collection interface types
                and then applies the corresponding comparison rules.
                This suffices for all currently supported collection types,
                but must be overridden if you define new Collection subinterfaces
                and/or implementations.
                
                </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.matches<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L210">removeAll</a></span>
<script>explorer.outline.addDecl('removeAll');</script>(Iterator!(T) <span class="funcparam">e</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.removeAll
                </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.removeAll<br><br>                Has to be here rather than in the superclass to satisfy
                D interface idioms<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/impl/MapCollection.d?rev=3461#L226">remove</a></span>
<script>explorer.outline.addDecl('remove');</script>(Iterator!(T) <span class="funcparam">e</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.removeElements
                </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.removeElements<br><br>                Has to be here rather than in the superclass to satisfy
                D interface idioms<br><br></dd></dl></dd></dl></td></tr>
                <tr><td id="docfooter">
                         :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Jun  8 17:12:54 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>